using System;
using System.Collections.Generic;
using System.Text;

namespace Deepcode.Flux.Core.Systems.Asset
{
	/// <summary>
	/// Represents a button that appears in the actions panel of the asset manager
	/// </summary>
	public class AssetActionButton
	{
		// Private members
		private string _Caption = "";
		private string _ActionUrl = "";
		private string _PreActionScript = "";
		private string _Target = "";

		/// <summary>
		/// The text to appear on the button
		/// </summary>
		public string Caption{ get{ return _Caption; }}
		/// <summary>
		/// The URL to open when clicked
		/// </summary>
		public string ActionUrl{ get{ return _ActionUrl; }}
		/// <summary>
		/// Javascript to execute when clicked before URL is opened
		/// </summary>
		public string PreActionScript{ get{ return _PreActionScript; }}
		/// <summary>
		/// Target to open ActionUrl into
		/// </summary>
		public string Target{ get{ return _Target; }}

		/// <summary>
		/// Construct an asset action button from the info passed in
		/// </summary>
		/// <param name="caption"></param>
		/// <param name="action"></param>
		/// <param name="preaction"></param>
		/// <param name="target"></param>
		public AssetActionButton( string caption, string action, string preaction, string target )
		{
			_Caption = caption;
			_ActionUrl = action;
			_PreActionScript = preaction;
			_Target = target;
		}
	}
}
